
package com.wyzz.hr.base.wf;

import com.wyzz.hr.base.Status;
import com.wyzz.hr.base.wf.leaverequest.LrWorkflow;
import com.wyzz.hr.base.wf.overtimerequest.OrWorkflow;
import com.wyzz.hr.base.wf.recruitrequest.RecWorkflow;
import com.wyzz.hr.base.wf.trainrequest.TrWorkflow;
import com.wyzz.hr.bo.AuthorityPosBo;
import com.wyzz.hr.bo.IPositionBo;
import com.wyzz.hr.bo.IWorkFlowBO;
import com.wyzz.hr.bo.UserBo;
import com.wyzz.hr.pojo.Department;
import com.wyzz.hr.pojo.Emailsend;
import com.wyzz.hr.pojo.Emailtemplate;
import com.wyzz.hr.pojo.Employee;
import com.wyzz.hr.pojo.Leaverequest;
import com.wyzz.hr.pojo.Location;
import com.wyzz.hr.pojo.Overtimerequest;
import com.wyzz.hr.pojo.Position;
import com.wyzz.hr.pojo.Recruitplan;
import com.wyzz.hr.pojo.Syslog;
import com.wyzz.hr.pojo.Tremployeeplan;
import com.wyzz.hr.pojo.Userinfo;
import com.wyzz.hr.spring.SpringBeanFactory;
import com.wyzz.hr.util.ObjectUtil;

import java.math.BigDecimal;
import java.util.*;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public abstract class AbstractWorkflow {

	public AbstractWorkflow() {
	}

	public static List getPropertyName(Object obj) {
		List result = new ArrayList();
		if (obj instanceof Leaverequest) {
			result.add("Leaverequest");
			result.add(Leaverequest.PROP_LR_NO);
		} else if (obj instanceof Overtimerequest) {
			result.add("Overtimerequest");
			result.add(Overtimerequest.PROP_OR_NO);
		} else if (obj instanceof Tremployeeplan) {
			result.add("Tremployeeplan");
			result.add(Tremployeeplan.PROP_TRP_NO);
		} else if (obj instanceof Recruitplan) {
			result.add("Recruitplan");
			result.add(Recruitplan.PROP_RECP_NO);
		}
		return result;
	}

	public static AbstractWorkflow getWorkFlow(Object obj, String operate,
			String comment, Employee currentEmp, Date lastChangeTime) {
		if (obj instanceof Leaverequest) {
			Leaverequest lr = (Leaverequest) obj;
			lr.setLrLastChangeBy(currentEmp);
			lr.setLrLastChangeTime(lastChangeTime);
			if (operate.contains("create")) {
				lr.setLrCreateBy(currentEmp);
				lr.setLrCreateTime(lastChangeTime);
			}
			return new LrWorkflow(operate, comment, obj);
		}
		if (obj instanceof Overtimerequest) {
			Overtimerequest or = (Overtimerequest) obj;
			or.setOrLastChangeBy(currentEmp);
			or.setOrLastChangeTime(lastChangeTime);
			if (operate.contains("create")) {
				or.setOrCreateBy(currentEmp);
				or.setOrCreateTime(lastChangeTime);
			}
			return new OrWorkflow(operate, comment, obj);
		}
		if (obj instanceof Tremployeeplan) {
			Tremployeeplan tr = (Tremployeeplan) obj;
			tr.setTrpLastChangeBy(currentEmp);
			tr.setTrpLastChangeTime(lastChangeTime);
			if (operate.contains("create")) {
				tr.setTrpCreateBy(currentEmp);
				tr.setTrpCreateTime(lastChangeTime);
			}
			return new TrWorkflow(operate, comment, obj);
		}
		if (obj instanceof Recruitplan) {
			Recruitplan recp = (Recruitplan) obj;
			recp.setRecpLastChangeBy(currentEmp);
			recp.setRecpLastChangeTime(lastChangeTime);
			if (operate.contains("create")) {
				recp.setRecpCreateBy(currentEmp);
				recp.setRecpCreateTime(lastChangeTime);
			}
			return new RecWorkflow(operate, comment, obj);
		} else {
			return null;
		}
	}

	public static AbstractWorkflow getWorkflowAndSyslog(Object obj, Syslog log) {
		if (obj instanceof Leaverequest) {
			log.setSlRecordId(new String(((Leaverequest) obj).getLrId()));
			return ((Leaverequest) obj).getWorkflow();
		}
		if (obj instanceof Overtimerequest) {
			log.setSlRecordId(new String(((Overtimerequest) obj).getOrId()));
			return ((Overtimerequest) obj).getWorkflow();
		}
		if (obj instanceof Tremployeeplan) {
			log.setSlRecordId(new String(((Tremployeeplan) obj).getTrpId()));
			return ((Tremployeeplan) obj).getWorkflow();
		}
		if (obj instanceof Recruitplan) {
			log.setSlRecordId(new String(((Recruitplan) obj).getId()));
			return ((Recruitplan) obj).getWorkflow();
		} else {
			return null;
		}
	}

	public static String getFlowType(Object obj) {
		if (obj instanceof Leaverequest)
			return "leaverequest";
		if (obj instanceof Overtimerequest)
			return "overtimerequest";
		if (obj instanceof Tremployeeplan)
			return "trainrequest";
		if (obj instanceof Recruitplan)
			return "recruitrequest";
		else
			return null;
	}

	public void WorkflowInit(String operate, String comment, Leaverequest lr) {
		currStatus = lr.getLrStatus();
		currApprover = lr.getLrNextApprover();
		flowType = "leaverequest";
		docNo = lr.getLrNo();
		docDesc = "\u8BF7\u5047\u5355";
		applier = lr.getLrEmpNo();
		creator = lr.getLrCreateBy();
		amount = lr.getLrTotalDays();
		operator = lr.getLrLastChangeBy();
		opTime = lr.getLrLastChangeTime();
		this.operate = operate;
		this.comment = comment;
		flowObj = lr;
		lr.setWorkflow(this);
	}

	public void WorkflowInit(String operate, String comment, Overtimerequest or) {
		currStatus = or.getOrStatus();
		currApprover = or.getOrNextApprover();
		flowType = "overtimerequest";
		docNo = or.getOrNo();
		docDesc = "\u52A0\u73ED\u5355";
		applier = or.getOrEmpNo();
		creator = or.getOrCreateBy();
		amount = or.getOrTotalHours();
		operator = or.getOrLastChangeBy();
		opTime = or.getOrLastChangeTime();
		this.operate = operate;
		this.comment = comment;
		flowObj = or;
		or.setWorkflow(this);
	}

	public void WorkflowInit(String operate, String comment, Tremployeeplan tr) {
		currStatus = tr.getTrpStatus();
		currApprover = tr.getTrpNextApprover();
		flowType = "trainrequest";
		docNo = tr.getTrpNo();
		docDesc = "\u57F9\u8BAD\u7533\u8BF7";
		applier = tr.getTrpTraineeNo();
		creator = tr.getTrpCreateBy();
		operator = tr.getTrpLastChangeBy();
		opTime = tr.getTrpLastChangeTime();
		this.operate = operate;
		this.comment = comment;
		flowObj = tr;
		tr.setWorkflow(this);
	}

	public void WorkflowInit(String operate, String comment, Recruitplan recp) {
		currStatus = recp.getRecpStatus();
		currApprover = recp.getRecpNextApprover();
		flowType = "recruitrequest";
		docNo = recp.getRecpNo();
		docDesc = "\u62DB\u8058\u8BA1\u5212";
		applyDeptNo = recp.getRecpDepartmentNo();
		applyLocNo = recp.getRecpWorkLocation();
		creator = recp.getRecpCreateBy();
		operator = recp.getRecpLastChangeBy();
		opTime = recp.getRecpLastChangeTime();
		this.operate = operate;
		this.comment = comment;
		flowObj = recp;
		recp.setWorkflow(this);
	}

	public static boolean wfRelationCheck(AbstractWorkflow wf) {
		Employee operEmp = wf.getOperator();
		String operate = wf.getOperate();
		if (!"hr-create".equals(operate) && !"hr-update".equals(operate)
				&& !operate.contains("mgr-"))
			return true;
		boolean canApprove = false;
		if (operEmp.isHasApproveAuth())
			if (wf.getFlowType().equals("recruitrequest")) {
				AuthorityPosBo authposBo = (AuthorityPosBo) SpringBeanFactory
						.getBean("authPosService");
				if (authposBo.checkDeptAndLocInCharge(operEmp.getPosition()
						.getId(), Integer.valueOf(6), wf.getApplyDeptNo()
						.getId(), wf.getApplyLocNo().getId()))
					canApprove = true;
			} else if (ObjectUtil.contains(operEmp.getEmpInCharge(), wf
					.getApplier().getId()))
				canApprove = true;
		if (("mgr-approve".equals(operate) || "mgr-reject".equals(operate) || "mgr-modify"
				.equals(operate))
				&& !canApprove)
			return false;
		if ("hr-create".equals(operate) || "hr-update".equals(operate)) {
			if (canApprove)
				operate = operate.replace("hr-", "mgr-");
			else
				operate = operate.replace("hr-", "");
		} else if (!canApprove)
			operate = operate.replace("mgr-", "");
		wf.setOperate(operate);
		return true;
	}

	public static boolean wfStatusCheck(AbstractWorkflow wf) {
		String operate = wf.getOperate();
		Integer status = wf.getCurrStatus();
		if (operate.contains("create"))
			return true;
		if (operate.contains("update")) {
			if (21 == status.intValue())
				return true;
		} else if (operate.contains("mgr-") || operate.contains("gm-")) {
			if (Status.MGR_UPD_SET.contains(status)
					&& wf.getCurrApprover() != null)
				return true;
		} else if (operate.equals("hr-approve") || operate.equals("hr-reject")) {
			if (Status.HR_UPD_SET.contains(status)
					&& wf.getCurrApprover() == null)
				return true;
		} else if (operate.equals("hr-confirm")) {
			if (15 == status.intValue())
				return true;
		} else if (operate.equals("hr-cancel")
				&& (15 == status.intValue() || 16 == status.intValue() || 31 == status
						.intValue()))
			return true;
		return false;
	}

	public boolean setWorkflowFields(AbstractWorkflow wf, Map templateMap,
			Map msgMap) {
		String operate = wf.getOperate();
		if (operate.contains("hr-")) {
			wf.setNextApprover(null);
			if (operate.equals("hr-approve"))
				wf.setStatus(Integer.valueOf(15));
			if (operate.equals("hr-reject"))
				wf.setStatus(Integer.valueOf(21));
			else if (operate.equals("hr-confirm"))
				wf.setStatus(Integer.valueOf(16));
			else if (operate.equals("hr-cancel"))
				wf.setStatus(Integer.valueOf(22));
			setObjFields(wf);
			wf.setSendList(emailNotify(wf, templateMap));
		} else if (operate.contains("gm-")) {
			wf.setNextApprover(null);
			if (operate.contains("reject"))
				wf.setStatus(Integer.valueOf(21));
			else
				wf.setStatus(Integer.valueOf(14));
			setObjFields(wf);
			if (operate.contains("reject")) {
				wf.setSendList(emailNotify(wf, templateMap));
			} else {
				wf.setSendList(emailNotify(wf, templateMap));
				wf.addToSendList(emailNotifyMGROrHR(wf, templateMap));
			}
		} else if (operate.contains("mgr-")) {
			IWorkFlowBO workFlowBo = (IWorkFlowBO) SpringBeanFactory
					.getBean("workFlowBO");
			if (!workFlowBo.getNextApproverOfMgr(wf)) {
				msgMap.clear();
				msgAdd(
						msgMap,
						wf.getDocNo(),
						(new StringBuilder())
								.append("\u7F16\u53F7\u4E3A{0}\u7684")
								.append(wf.getDocDesc())
								.append(
										"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\uFF01")
								.toString());
				return false;
			}
			setObjFields(wf);
			if (operate.contains("reject")) {
				wf.setNextApprover(null);
				wf.setSendList(emailNotify(wf, templateMap));
			} else {
				wf.setSendList(emailNotify(wf, templateMap));
				wf.addToSendList(emailNotifyMGROrHR(wf, templateMap));
			}
		} else if (operate.equals("create") || operate.equals("update")) {
			IWorkFlowBO workFlowBo = (IWorkFlowBO) SpringBeanFactory
					.getBean("workFlowBO");
			workFlowBo.getNextApproverOfOwn(wf);
			setObjFields(wf);
			wf.setSendList(emailNotify(wf, templateMap));
			wf.addToSendList(emailNotifyMGROrHR(wf, templateMap));
		} else {
			msgMap.clear();
			msgAdd(
					msgMap,
					wf.getDocNo(),
					(new StringBuilder())
							.append("\u7F16\u53F7\u4E3A{0}\u7684")
							.append(wf.getDocDesc())
							.append(
									"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\uFF01")
							.toString());
			return false;
		}
		return true;
	}

	public void msgMapAdd(AbstractWorkflow wf, Map msgMap) {
		String operate = wf.getOperate();
		Integer docNo = wf.getDocNo();
		String docDesc = wf.getDocDesc();
		if (operate.contains("hr-")) {
			if (operate.equals("hr-approve"))
				msgAdd(msgMap, docNo, (new StringBuilder()).append(
						"\u7F16\u53F7\u4E3A{0}\u7684").append(docDesc).append(
						"\u5907\u6848\u5B8C\u6BD5\u3002").toString());
			else if (operate.equals("hr-reject"))
				msgAdd(msgMap, docNo, (new StringBuilder()).append(
						"\u7F16\u53F7\u4E3A{0}\u7684").append(docDesc).append(
						"\u5DF2\u88AB\u62D2\u7EDD\u3002").toString());
			else if (operate.equals("hr-confirm"))
				msgAdd(msgMap, docNo, (new StringBuilder()).append(
						"\u7F16\u53F7\u4E3A{0}\u7684").append(docDesc).append(
						"\u8C03\u6574\u5B8C\u6BD5\u3002").toString());
			else if (operate.equals("hr-cancel"))
				msgAdd(msgMap, docNo, (new StringBuilder()).append(
						"\u7F16\u53F7\u4E3A{0}\u7684").append(docDesc).append(
						"\u5DF2\u88AB\u4F5C\u5E9F\u3002").toString());
		} else if (operate.contains("gm-")) {
			if (operate.contains("reject"))
				msgAdd(msgMap, docNo, (new StringBuilder()).append(
						"\u7F16\u53F7\u4E3A{0}\u7684").append(docDesc).append(
						"\u5DF2\u88AB\u62D2\u7EDD\u3002").toString());
			else
				msgAdd(msgMap, docNo, (new StringBuilder()).append(
						"\u7F16\u53F7\u4E3A{0}\u7684").append(docDesc).append(
						"\u5DF2\u62A5\u9001HR\u5BA1\u6279\u3002").toString());
		} else if (operate.contains("mgr-")) {
			if (operate.contains("reject"))
				msgAdd(msgMap, docNo, (new StringBuilder()).append(
						"\u7F16\u53F7\u4E3A{0}\u7684").append(docDesc).append(
						"\u5DF2\u88AB\u62D2\u7EDD\u3002").toString());
			else
				msgAdd(msgMap, docNo, (new StringBuilder()).append(
						"\u7F16\u53F7\u4E3A{0}\u7684").append(docDesc).append(
						"\u5DF2\u62A5\u9001").append(wf.getNextApproverDesc())
						.append("\u5BA1\u6279\u3002").toString());
		} else if (operate.contains("create"))
			msgAdd(msgMap, docNo, (new StringBuilder()).append(
					"\u7F16\u53F7\u4E3A{0}\u7684").append(docDesc).append(
					"\u521B\u5EFA\u6210\u529F\uFF0C\u5E76\u62A5\u9001").append(
					wf.getNextApproverDesc()).append("\u5BA1\u6279\u3002")
					.toString());
		else if (operate.contains("update"))
			msgAdd(
					msgMap,
					docNo,
					(new StringBuilder())
							.append("\u7F16\u53F7\u4E3A{0}\u7684")
							.append(docDesc)
							.append(
									"\u91CD\u65B0\u63D0\u4EA4\u6210\u529F\uFF0C\u5E76\u62A5\u9001")
							.append(wf.getNextApproverDesc()).append(
									"\u5BA1\u6279\u3002").toString());
		else
			msgAdd(
					msgMap,
					docNo,
					(new StringBuilder())
							.append("\u7F16\u53F7\u4E3A{0}\u7684")
							.append(docDesc)
							.append(
									"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\uFF01")
							.toString());
	}

	public abstract void setObjFields(AbstractWorkflow abstractworkflow);

	public List emailNotify(AbstractWorkflow wf, Map templateMap) {
		List esList = new ArrayList();
		if (wf.getOperate().contains("create")
				|| wf.getOperate().contains("update"))
			return esList;
		String etTitleNo = getTemplateByNotify(wf);
		Emailtemplate template = (Emailtemplate) templateMap.get(etTitleNo);
		if (template == null) {
			log.warn((new StringBuilder()).append("\u6A21\u677F").append(
					etTitleNo).append(
					"\u4E0D\u5B58\u5728\u6216\u5DF2\u505C\u7528\uFF01")
					.toString());
			return esList;
		}
		String applierEmail = null;
		String creatorEmail = null;
		if (!"recruitrequest".equals(wf.getFlowType())
				&& wf.getApplier() != null
				&& wf.getApplier().getEmpStatus().intValue() != 0)
			applierEmail = wf.getApplier().getEmpEmail();
		if (wf.getCreator().getEmpStatus().intValue() != 0)
			creatorEmail = wf.getCreator().getEmpEmail();
		Emailsend emailsend = new Emailsend();
		if (applierEmail != null) {
			emailsend.setEsTo(applierEmail);
			if (creatorEmail != null
					&& creatorEmail.equalsIgnoreCase(applierEmail))
				emailsend.setEsCc(creatorEmail);
		} else {
			emailsend.setEsTo(creatorEmail);
		}
		if (StringUtils.isEmpty(emailsend.getEsTo())) {
			return esList;
		} else {
			initMailParams(emailsend, wf, etTitleNo, null);
			setEsStatus(emailsend, template);
			esList.add(emailsend);
			return esList;
		}
	}

	public List emailNotifyMGROrHR(AbstractWorkflow wf, Map templateMap) {
		String etTitleNo = getTemplateByOperate(wf);
		Emailtemplate template = (Emailtemplate) templateMap.get(etTitleNo);
		if (template == null) {
			log.warn((new StringBuilder()).append("\u6A21\u677F").append(
					etTitleNo).append(
					"\u4E0D\u5B58\u5728\u6216\u5DF2\u505C\u7528\uFF01")
					.toString());
			return null;
		}
		List esList = new ArrayList();
		if (wf.getNextApprover() == null) {
			List userList = null;
			UserBo userBo = (UserBo) SpringBeanFactory.getBean("userService");
			userList = userBo.getEmpByAuth(wf.getFlowType());
			if (userList == null || userList.size() == 0)
				return esList;
			Iterator i$ = userList.iterator();
			do {
				if (!i$.hasNext())
					break;
				Userinfo hrUser = (Userinfo) i$.next();
				Emailsend emailsend = new Emailsend();
				emailsend.setEsTo(hrUser.getEmployee().getEmpEmail());
				if (!StringUtils.isEmpty(emailsend.getEsTo())) {
					initMailParams(emailsend, wf, etTitleNo, hrUser
							.getEmployee());
					setEsStatus(emailsend, template);
					esList.add(emailsend);
				}
			} while (true);
			return esList;
		}
		IPositionBo positionBo = (IPositionBo) SpringBeanFactory
				.getBean("positionBo");
		Position position = positionBo.getPosById(wf.getNextApprover(),
				new String[] { Position.PROP_POSITION_EMP_NO });
		Employee nextApprover = position.getPositionEmpNo();
		if (nextApprover == null)
			return esList;
		if (StringUtils.isEmpty(nextApprover.getEmpEmail())) {
			return esList;
		} else {
			Emailsend emailsend = new Emailsend();
			emailsend.setEsTo(nextApprover.getEmpEmail());
			initMailParams(emailsend, wf, etTitleNo, nextApprover);
			setEsStatus(emailsend, template);
			esList.add(emailsend);
			return esList;
		}
	}

	public abstract String getTemplateByNotify(AbstractWorkflow abstractworkflow);

	public abstract String getTemplateByOperate(
			AbstractWorkflow abstractworkflow);

	public abstract void initMailParams(Emailsend emailsend,
			AbstractWorkflow abstractworkflow, String s, Employee employee);

	public String getConfirmUrl(String operatorId, String recordId,
			String securityNo, String flowType) {
		StringBuffer urlBuffer = new StringBuffer("emailApprove");
		urlBuffer.append("?").append("objId=").append(recordId);
		urlBuffer.append("&").append("employeeId=").append(operatorId);
		urlBuffer.append("&").append("securityNo=").append(securityNo);
		urlBuffer.append("&").append("flowType=").append(flowType);
		return urlBuffer.toString();
	}

	protected void msgAdd(Map msgMap, Integer docNo, String key) {
		StringBuffer msgValue = (StringBuffer) msgMap.get(key);
		if (msgValue == null) {
			msgValue = new StringBuffer(docNo.toString());
			msgMap.put(key, msgValue);
		} else {
			msgValue.append(", ").append(docNo);
			msgMap.put(key, msgValue);
		}
	}

	public static void setEsStatus(Emailsend es, Emailtemplate et) {
		if (et.getEtStatus().intValue() == 1)
			es.setEsStatus(et.getEtSendMode());
		else
			es.setEsStatus(Integer.valueOf(3));
	}

	public void addToSendList(List esList) {
		if (esList == null)
			return;
		if (getSendList() == null || getSendList().size() == 0)
			setSendList(esList);
		else
			getSendList().addAll(esList);
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public Employee getApplier() {
		return applier;
	}

	public void setApplier(Employee applier) {
		this.applier = applier;
	}

	public Department getApplyDeptNo() {
		return applyDeptNo;
	}

	public void setApplyDeptNo(Department applyDeptNo) {
		this.applyDeptNo = applyDeptNo;
	}

	public Location getApplyLocNo() {
		return applyLocNo;
	}

	public void setApplyLocNo(Location applyLocNo) {
		this.applyLocNo = applyLocNo;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public Employee getCreator() {
		return creator;
	}

	public void setCreator(Employee creator) {
		this.creator = creator;
	}

	public String getCurrApprover() {
		return currApprover;
	}

	public void setCurrApprover(String currApprover) {
		this.currApprover = currApprover;
	}

	public Integer getCurrStatus() {
		return currStatus;
	}

	public void setCurrStatus(Integer currStatus) {
		this.currStatus = currStatus;
	}

	public String getDocDesc() {
		return docDesc;
	}

	public void setDocDesc(String docDesc) {
		this.docDesc = docDesc;
	}

	public Integer getDocNo() {
		return docNo;
	}

	public void setDocNo(Integer docNo) {
		this.docNo = docNo;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getNextApprover() {
		return nextApprover;
	}

	public void setNextApprover(String nextApprover) {
		this.nextApprover = nextApprover;
	}

	public List getSendList() {
		return sendList;
	}

	public void setSendList(List sendList) {
		this.sendList = sendList;
	}

	public String getOperate() {
		return operate;
	}

	public void setOperate(String operate) {
		this.operate = operate;
	}

	public Employee getOperator() {
		return operator;
	}

	public void setOperator(Employee operator) {
		this.operator = operator;
	}

	public Object getFlowObj() {
		return flowObj;
	}

	public void setFlowObj(Object flowObj) {
		this.flowObj = flowObj;
	}

	public Date getOpTime() {
		return opTime;
	}

	public void setOpTime(Date opTime) {
		this.opTime = opTime;
	}

	public String getNextApproverDesc() {
		return nextApproverDesc;
	}

	public void setNextApproverDesc(String nextApproverDesc) {
		this.nextApproverDesc = nextApproverDesc;
	}

	public String getFlowType() {
		return flowType;
	}

	public void setFlowType(String flowType) {
		this.flowType = flowType;
	}

	protected static final Log log = LogFactory
			.getLog(com.wyzz.hr.bo.impl.EmpApproverBoImpl.class);
	protected static final long serialVersionUID = 1L;
	protected Integer currStatus;
	protected String currApprover;
	protected String flowType;
	protected Integer status;
	protected String nextApprover;
	protected String nextApproverDesc;
	protected Integer docNo;
	protected String docDesc;
	protected BigDecimal amount;
	protected Employee applier;
	protected Department applyDeptNo;
	protected Location applyLocNo;
	protected Employee creator;
	protected Employee operator;
	protected List sendList;
	protected String operate;
	protected String comment;
	protected Date opTime;
	protected Object flowObj;

}
